<include file="public@header"/>
</head>
<body>
<div class="wrap js-check-wrap">
    <ul class="nav nav-tabs">
		<li><a href="{:url('auth/idcard')}">认证列表</a></li>
		<li class="active"><a href="{:url('auth/detail')}">认证详情</a></li>
    </ul>
    <div class="row margin-top-20">
        
        <div class="col-md-6" style="margin-left:50px;">
            <form class="js-ajax-form" action="{:url('Other/addversion')}" method="post">
                <div class="tab-content">
                    <div class="tab-pane active" id="A">
                        
                        <div class="form-group">
                            <label for="input-name"><span class="form-required">*</span>昵称</label>
                            <div>
                                <input type="text" class="form-control" id="input-name" name="nick" value="{$info.nick}" readonly>
                            </div>
                        </div>

                        <div class="form-group">
                            <label for="input-name">车型</label>
                            <div>
                                <input type="text" class="form-control" id="input-alias" name="version_name" value="{$info.cartype}" readonly>
                            </div>
                        </div>
						
						<div class="form-group">
                            <label for="input-name">颜色</label>
                            <div>
                                <input type="text" class="form-control" id="input-alias" name="version_name" value="{$info.color}" readonly>
                            </div>
                        </div>
						
						 <div class="form-group">
                            <label for="input-name">驾驶证</label>
                            <div>
                                <input type="text" class="form-control" id="input-alias" name="version_name" value="{$info.licence}" readonly>
                            </div>
                        </div>
						
						<div class="form-group">
                            <label for="input-description">驾驶证照片</label>
                            <div>
                                <img src="/interface/public/uploads/{$info.drivinglicence}" style="width:40%;height:30%;">
                            </div>
                        </div>
						
						<div class="form-group">
                            <label for="input-description">行驶证照片</label>
                            <div>
                                <img src="/interface/public/uploads/{$info.licencepicture}" style="width:40%;height:30%;">
                            </div>
                        </div>
                        
                    </div>
                    
                </div>
                <div class="form-group">
                    <button type="button" class="btn btn-primary" onclick="agree({$info.id})">同意</button>
					<button type="button" class="btn btn-primary" onclick="reject({$info.id})">拒绝</button>
                    <a class="btn btn-default" href="{:url('auth/licenceauth')}">{:lang('BACK')}</a>
                </div>
            </form>
        </div>
    </div>
</div>
<script type="text/javascript" src="__STATIC__/js/admin.js"></script>
<script src="__STATIC__/js/layer/layer.js"></script>
<script>
	function agree(id){
		layer.confirm('确定要同意么？',function(){
			$.ajax({
				type:'post',
				url:"{:url('auth/licenceagree')}",
				data:'id='+id,
				success:function(msg){
					if(msg.code==1){
						layer.alert('已同意',{'icon':1},function(){
							history.go(-1)
						});
					}else{
						layer.alert('操作失败');
					}
				}
			})
		})
	}
	
	function reject(id){
		layer.confirm('确定要拒绝么？',function(){
			$.ajax({
				type:'post',
				url:"{:url('auth/licencereject')}",
				data:'id='+id,
				success:function(msg){
					if(msg.code==1){
						layer.alert('已拒绝',{'icon':1},function(){
							history.go(-1)
						});
					}else{
						layer.alert('操作失败');
					}
				}
			})
		})
	}
</script>
</body>
</html>